<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script>
    // 14.  将数组用 | 或其他符号连接成一个字符串
    var arr = ['a','b',1,2,'你好'];
    //构造函数，fuhao为自定义界定符
    function change(arr,fuhao){
      var str = arr.join(fuhao);
      return str;
    }
    console.log(change(arr,"|"));
    console.log(change(arr,"="));
  </script>
</head>
<body>
  
</body>
</html>